import com.lhfmqc.controller.BookController;
import com.lhfmqc.pojo.Books;
import javafx.application.Application;
import org.junit.Test;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

import java.util.List;

/**
 * @author lhfmqc
 * @date 2021/10/2/002 13:44
 */
public class testfun {
    @Test
    public void test(){
        ApplicationContext app = new ClassPathXmlApplicationContext("springmvc.xml");
        BookController bc = (BookController) app.getBean("bookController");
        List<Books> allbooks = bc.queryAllBook();
        for(Books books:allbooks){
            System.out.println(books);
        }

    }
}
